package com.amap.manager;

import com.amap.handler.AmapBusinessHandler;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

/**
 * @author liuyi
 * @since 2025/10/31 11:13
 */
@Service
public class BusinessHandlerManager {
    private final ApplicationContext applicationContext;

    public BusinessHandlerManager(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    public AmapBusinessHandler getBusinessHandler(String handlerName) {
        return (AmapBusinessHandler)this.applicationContext.getBean(handlerName);
    }
}